﻿<!--#include file="Template.asp"-->
<%
'页面访问记数器
Dim Id
    Id=Request("ID")
If Not IsNumeric(ID) or ID="" Then
    Response.End
End If
Dim Display
	Display=trim(request("Display"))
If Display="News" Then
	Call News()	
ElseIf Display="Prod" Then
	Call Prod()	
ElseIf Display="Down" Then
	Call Down()	
End If
'################################33
Sub News() '新闻资源记录点击
Set Conn = Server.CreateObject("Adodb.Connection")
    Conn.Open ConnStr
Dim Sql
    Sql="Select [Count] from [Easyes_News] Where ArticleId=" & CInt(ID)
Dim Rs
Set Rs=Server.CreateObject("Adodb.RecordSet")
Rs.Open Sql,Conn,1,3
If Not (Rs.Eof And Rs.Bof) Then
    Rs("Count")=Rs("Count")+1
    Rs.Update
End If
	Response.Write "document.write(""" & Rs("Count") & """);"
Rs.Close
Set Rs=Nothing
Conn.Close
Set Conn=Nothing
End Sub
'################################33
Sub Prod() '产品资源记录点击
Set Conn = Server.CreateObject("Adodb.Connection")
    Conn.Open ConnStr
Dim Sql
    Sql="Select [Count] from [Easyes_Products] Where ProductsID=" & CInt(ID)
Dim Rs
Set Rs=Server.CreateObject("Adodb.RecordSet")
Rs.Open Sql,Conn,1,3
If Not (Rs.Eof And Rs.Bof) Then
    Rs("Count")=Rs("Count")+1
    Rs.Update
End If
	Response.Write "document.write(""" & Rs("Count") & """);"
Rs.Close
Set Rs=Nothing
Conn.Close
Set Conn=Nothing
End Sub
'################################33
Sub Down() '下载资源记录点击
Set Conn = Server.CreateObject("Adodb.Connection")
    Conn.Open ConnStr
Dim Sql
    Sql="Select [Count] from [Easyes_Down] Where DownID=" & CInt(ID)
Dim Rs
Set Rs=Server.CreateObject("Adodb.RecordSet")
Rs.Open Sql,Conn,1,3
If Not (Rs.Eof And Rs.Bof) Then
    Rs("Count")=Rs("Count")+1
    Rs.Update
End If
	Response.Write "document.write(""" & Rs("Count") & """);"
Rs.Close
Set Rs=Nothing
Conn.Close
Set Conn=Nothing
End Sub
%>